﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Server.TcpIp
{
    public delegate void MsgReceivedEventHandler(object sender, MsgReceivedEventArgs e);

    public class MsgReceivedEventArgs : EventArgs
    {
        /// <summary>
        /// The message contained in the arguments
        /// </summary>
        private readonly string _message;
        /// <summary>
        /// The id of the module that generated the message
        /// </summary>
        private readonly string _id;

        /// <summary>
        /// Creates a new MsgReceivedEventArgs object
        /// </summary>
        /// <param name="id">The id of the module that generated the message</param>
        /// <param name="message">The message containing the xml</param>
        public MsgReceivedEventArgs(string id, string message)
        {
            this._id = id;
            this._message = message;
        }

        /// <summary>
        /// The module's ID
        /// </summary>
        public string Id
        {
            get
            {
                return _id;
            }
        }
        /// <summary>
        /// The XML message generated by the module
        /// </summary>
        public string Message
        {
            get
            {
                return _message;
            }
        }
    }
}
